package com.tyk.bookstore.back.product.model.query;

import com.tyk.bookstore.back.common.core.model.page.PageQuery;
import com.tyk.bookstore.back.product.model.enume.BookSortOrder;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * @author tyk
 * @description 书籍统计信息
 */
@Data
@Schema(name = "BookStatisticPageQuery", description = "书籍统计信息")
public class BookStatisticPageQuery extends PageQuery implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(description = "关键字")
    private String keyword;

    @Schema(description = "书名")
    private String bookName;

    @Schema(description = "书籍编号或ISBN")
    private String bookNoOrIsbn;

    @Schema(description = "书籍")
    private Long bookId;

    @Schema(description = "收藏人数：起始")
    private Long collectNumFrom;

    @Schema(description = "收藏人数：终止")
    private Long collectNumTo;

    @Schema(description = "支付人数：起始")
    private Long payNumFrom;

    @Schema(description = "支付人数：终止")
    private Long payNumTo;

    @Schema(description = "评论人数：起始")
    private Long commentNumFrom;

    @Schema(description = "评论人数：终止")
    private Long commentNumTo;

    @Schema(description = "销量：起始")
    private Long saleNumFrom;

    @Schema(description = "销量：终止")
    private Long saleNumTo;

    @Schema(description = "点赞人数：起始")
    private Long likeNumFrom;

    @Schema(description = "点赞人数：终止")
    private Long likeNumTo;

    @Schema(description = "价格(冗余)：起始")
    private BigDecimal priceFrom;

    @Schema(description = "价格(冗余)：终止")
    private BigDecimal priceTo;

    @Schema(description = "排序方式[0综合,1销量,2支付人数,3收藏人数,4评论人数,5点赞人数,6价格]")
    @NotNull
    private BookSortOrder sortOrder;

    @NotNull
    @Schema(description = "是否降序")
    private Boolean desc;

}
